package cn.lizemin.command.version0.entity;

/**
 * @author lzm
 * @version 1.0
 * @description: 指令对象，将指令封装为对象
 * @date 2022/5/12 9:53
 */
public class SwitchCommand implements Command {

    private Bulb bulb;

    public SwitchCommand(Bulb bulb) {
        this.bulb = bulb;
    }

    @Override
    public void exe() {
        bulb.on();//开灯
    }

    @Override
    public void unexe() {
        bulb.off();//关灯
    }
}
